Class | BeheerController
In: | app/controllers/beheer_controller.rb
Parent: | ApplicationController

### Methods

index login logout

### Public Instance methods

index()

[Source]

        # File app/controllers/beheer_controller.rb, line 23
    23:   def index
    24:     @aantal_orders = Order.count
    25:   end

login()

[Source]

        # File app/controllers/beheer_controller.rb, line 3
     3:   def login
     4:       session[:inlog_ok] = false
     5:       if request.post?
     6:           if params[:naam] == 'Super_user_ITMEDIA' && params[:paswoord] == 'BBB479+' then
     7:               session[:inlog_ok] = true
     8:               uri = session[:originele_uri]  # redirect na inloggen naar origineel gevraagde adres
     9:               session[:originele_uri] = nil
    10:               redirect_to(uri || { :action => "index" })
    11:           else
    12:                flash[:notice] = "Inloggegevens zijn foutief!"
    13:           end
    14:       end
    15:   end

logout()

[Source]

        # File app/controllers/beheer_controller.rb, line 17
    17:   def logout
    18:     session[:inlog_ok] = false
    19:     flash[:notice] = "U bent uitgelogd"
    20:     redirect_to :controller => :beheer, :action => :login
    21:   end

[Validate]